<section class="scrollable padder-md" data-ng-controller="TripCommonController">
    <section data-ng-controller="TripEditController">
        <div class="m-b-md">
            <a href="" class="btn btn-rounded  btn-sm btn-icon btn-default pull-right" data-ng-click="close()">
                <i class="fa fa-reply"></i>
            </a>
            <h3 class="m-b-none text-black">
                <i class="fa fa-edit m-r-sm"></i>
                乘客行程- {{trip.name || '新增'}}
            </h3>
        </div>

        <section class="panel panel-default">
            <div class="panel-body">
                <form name="tripForm" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            乘客行程名：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{trip.name}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            路线：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.routeName}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            费用：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.cost}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            车牌号：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.carNo}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            司机：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.driver.nickname}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            下单账号：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.passenger.username}}</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            下单账号联系电话：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.passenger.tel}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            支付订单号：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.order.no || "乘客还没支付"}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            状态：
                        </label>
                        <div class="col-md-8">
                            <select data-required="true"
                                    class="input-sm form-control"
                                    data-ng-model="trip.state"
                                    data-ng-options="state.value as state.name for state in tripStates">
                                <option value="">全部</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            创建时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="trip.state == -1">
                        <label class="col-md-3 control-label">
                            取消时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.cancelTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="trip.state > 0 ">
                        <label class="col-md-3 control-label">
                            发车时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.startTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="trip.state >= 20 ">
                        <label class="col-md-3 control-label">
                            到达时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control">{{trip.arriveTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="trip.state > 30 ">
                        <label class="col-md-3 control-label">
                            支付时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{trip.payTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group" ng-show="trip.state >= 50 ">
                        <label class="col-md-3 control-label">
                            乘客行程完成时间：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{trip.completeTime | date:'yyyy-MM-dd HH:mm:ss'}}</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            乘客信息：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{trip.passenger.nickname}}</span>
                            <!--<table class="table table-striped b-t b-light">-->
                                <!--<thead>-->
                                <!--<tr>-->
                                    <!--<th>乘客名</th>-->
                                <!--</tr>-->
                                <!--</thead>-->
                                <!--<tbody>-->
                                <!--<tr data-ng-repeat="p in trip.tripPassengers">-->
                                    <!--<td>{{p.nickname}}</td>-->
                                <!--</tr>-->
                                <!--</tbody>-->
                            <!--</table>-->
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            预定座位数：
                        </label>
                        <div class="col-md-8">
                            <span class="form-control"> {{trip.seat}}</span>
                        </div>
                    </div>

                    <!-- 按钮 -->
                    <div class="form-group text-right" style="margin-left: 15px; margin-right: 15px;">
                        <button type="button" class="btn btn-default" data-ng-click="close()">
                            <i class="i i-arrow"></i>
                            &nbsp;返回
                        </button>
                        <button type="submit" class="btn btn-success" data-ng-click="cancelTrip()">
                            <i class="fa fa-magic"></i>
                            &nbsp;取消乘客行程
                        </button>
                        <button type="button" class="btn btn-success" data-ng-click="flowTripToDriver()">
                            <i class="i i-flow-tree"></i>
                            &nbsp;流转乘客行程订单
                        </button>
                        <!--<button type="submit" class="btn btn-success" data-ng-click="forceChangeSatate()">-->
                            <!--<i class="fa fa-flash"></i>-->
                            <!--&nbsp;强制修改状态-->
                        <!--</button>-->
                    </div>
                </form>
            </div>
        </section>
    </section>
</section>
